<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:sg="http://java.sun.com/jsf/composite/ezcomp"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:head>
        <h:outputStylesheet library="css" name="Main.css" />
        <h:outputStylesheet library="css" name="TopMenu.css" />
        <h:outputStylesheet library="css" name="Footer.css" />
        <h:outputStylesheet library="css" name="Form.css" />
        <h:outputStylesheet library="css" name="tipsy.css" />
        <h:outputScript library="javascript" name="jQuery.js" />
        <h:outputScript library="javascript" name="jquery.tipsy.js" />
        <h:outputScript library="javascript" name="cycle.js" />
        <h:outputScript library="javascript" name="facebookApi.js" />
        <h:outputScript library="javascript" name="MyFaceBook.js" />
        <title>SmartGrid</title>
        <script type="text/javascript"> 
            $(document).ready(function() {
                $('.slideshow').cycle({
                    fx: 'scrollUp'
                });
            });

        </script>
        <style type="text/css"> 
            .slideshow { height: 150px; width: 730px; margin: auto; }
        </style>
    </h:head>
    <h:body>
        <div id="fb-root"></div>
        <script>
            var SG = SmartGrid();
        </script>
        <sg:pageHeader>
            <ui:param name="menu" value="false" />
        </sg:pageHeader>
        <div class="slideshow">
            <h:graphicImage library="images" name="slide1.png" />
            <h:graphicImage library="images" name="slide2.png" />
        </div>

        <div id="container">
            <h:form id="contractform" styleClass="formS">
                <div id="focus">
                    <fieldset style="border-top:1px solid #ccc;">
                        <div class="fm-opt">
                            <label><h:outputText value="Fornecedor"/></label>
                            <h:selectOneMenu id="supplierCombo" value="#{unregisteredBackingBean.selectedSupplier}" title="Seleccionar o fornecedor de energia.">
                                <f:selectItems value="#{unregisteredBackingBean.suppliersList}" />
                            </h:selectOneMenu>
                        </div>
                        <div class="fm-opt">
                            <label><h:outputText value="Número de Contrato"/></label>
                            <h:inputText id="contract" value="#{unregisteredBackingBean.contract}" title="Inserir número de contracto com o fornecedor de energia." />
                            <h:message styleClass="error" id="contractError" for="contract" />
                        </div>

                        <div class="fm-opt">
                            <label class="label"><h:outputText value="Número de Contribuinte" /></label>
                            <h:inputText id="nif" value="#{unregisteredBackingBean.nif}" title="Inserir número de identificação fiscal do titular do contrato com o fornecedor de energia." />
                            <h:message styleClass="error" id="nifError" for="nif" />
                        </div>
                    </fieldset>
                </div>
                <div id="fm-submit">
                    <h:commandButton id="SubmitButton" value="Submeter" action="#{unregisteredBackingBean.submit()}" title="Clique para prosseguir" />
                </div>
            </h:form>
        </div>
        <script>
            $(function() {
                $('#focus [title]').tipsy({trigger: 'focus', gravity: 'w'});
            });
            $('#contractform\\:SubmitButton').tipsy({gravity: 's', fade: true, delayIn: 100, delayOut: 300});
        </script>
        <sg:pageFooter />
    </h:body>
</html>

